package com.u2b.servlet.utils;



import com.u2b.beans.User;

import net.sf.json.JSONObject;

public class JsonUtils {
	public static User getUserBeanObject(String jsonString,
			String key , String[] keys) {
		User user = new User();
		JSONObject jsonObj = JSONObject.fromObject(jsonString);
		JSONObject  userJsonObj= jsonObj.getJSONObject(key);
		for(int i=0;i<keys.length;i++){
			
		//	user.getValues().put(keys[i],userJsonObj.getString(keys[i]));
		}
		
		
		return user;
		

	}
    public   static    String    createJsonByObject(String key,Object  obj){
    	String jsonString = null;
		JSONObject jsonObject = new JSONObject();
		jsonObject.put(key, obj);
		return jsonObject.toString();
    	
	
    	
    	
    	
    	
    }
	
	
	
}
